import { h } from 'preact';

import Dragable from './Dragable';

// TODO: 通过配置，走context来读取
const enableDragable = true;

function Behavior({ children, model }) {

  // TODO: 处理多个behavior的嵌套包裹问题
  return (
    enableDragable === true
      ? (
        <Dragable model={model} >
          {children}
        </Dragable>
      )
      : children
  );
}

export default Behavior;
